<?php 
	header("Content-type:text/html;charset=utf-8"); 
	//print_r($_POST); 
	$phone=$_POST['phone'];
	$password=$_POST['password'];
	$realName=$_POST['realName'];
	//连接数据库
	$con=new mysqli("localhost","root","123456","myDB");
	$con->query("set names utf8");
	if($con->connect_error){
		die($con->connect_error);
	}
	//插入数据
	$sql="INSERT INTO users (phone,password,realName) VALUES($phone,$password,'$realName')";
	if($con->query($sql)===true){
		echo "成功";
	}else{
		echo $con->error;
	}
	$con->close();
?>